package com.suncnpap.journal.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.app.util.database.mybatis.Page;
import com.suncnpap.journal.service.BorrowJournalRecordService;
import com.suncnpap.journal.mapper.BorrowJournalRecordMapper;
import com.suncnpap.journal.model.BorrowJournalInfo;
import com.suncnpap.journal.model.BorrowJournalRecord;

/** 
 * 说明： 期刊借阅记录Service实现类
 * @version
 */
@Service("borrowJournalRecordService")
public class BorrowJournalRecordServiceImpl implements BorrowJournalRecordService{

	
	@Autowired
	BorrowJournalRecordMapper borrowJournalRecordMapper;
	
	@Override
	public void add(BorrowJournalRecord obj) {
		// TODO Auto-generated method stub
		borrowJournalRecordMapper.add(obj);
	}

	@Override
	public void update(BorrowJournalRecord obj) {
		// TODO Auto-generated method stub
		borrowJournalRecordMapper.edit(obj);
	}

	@Override
	public void deleteById(String strId) {
		// TODO Auto-generated method stub
		borrowJournalRecordMapper.deleteById(strId);
		
	}
	@Override
	public void deleteMore(String[] strIds) {
		// TODO Auto-generated method stub
		borrowJournalRecordMapper.deleteMore(strIds);
	}

	@Override
	public Page list(Page page) {
		// TODO Auto-generated method stub
		List<BorrowJournalRecord> list = borrowJournalRecordMapper.datalistPage(page);
		page.setDataList(list);
		return page;
	}


	@Override
	public int findCount(Page page) {
		// TODO Auto-generated method stub
		return borrowJournalRecordMapper.findCount(page);
	}

	@Override
	public BorrowJournalRecord findById(String strId) {
		// TODO Auto-generated method stub
		return borrowJournalRecordMapper.findById(strId);
	}
	
	@Override
	public BorrowJournalRecord findByJournalBarcode(String strJournalBarcode, String strSchoolId){
		return borrowJournalRecordMapper.findByJournalBarcode(strJournalBarcode, strSchoolId);
	}
	
	@Override
	public Page listInfo(Page page) {
		// TODO Auto-generated method stub
		List<BorrowJournalInfo> list = borrowJournalRecordMapper.dataInfolistPage(page);
		page.setDataList(list);
		return page;
	}
}

